import request from '@/utils/request'

// 分页获取订单列表
export const getCaseList = (query) => {
  return request({
    url: '/business/case/list',
    method: 'get',
    params: query
  })
}

// 根据订单Id获取详细信息
export const getCaseById = (caseId) => {
  return request({
    url: `/business/case/${caseId}`,
    method: 'get'
  })
}

// 增加订单
export const addCase = (data) => {
  return request({
    url: '/business/case',
    method: 'post',
    data
  })
}

// 修改订单
export const modifyCase = (data) => {
  return request({
    url: `/business/case`,
    method: 'put',
    data
  })
}

// 删除订单
export const delCase = (caseIds) => {
  return request({
    url: `/business/case/${caseIds}`,
    method: 'delete'
  })
}
